<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户管理</title>
		<link rel="stylesheet" type="text/css" href="css/base.css"/>
		<link rel="stylesheet" type="text/css" href="css/userManager.css"/>
		<link rel="stylesheet" type="text/css" href="css/simple.css"/>
		<script src="js/userManager.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<article id="articleUserInfoTable">
			<header>
				用户管理模块 - 用户信息管理
			</header>
			<table class="simpleTable">
				<thead >
					<tr>
						<td colspan="7" style="text-align: left;">
							<input type="search" name="keyword" id="keyword"><button class="simpleButton">查询</button>
						</td>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="7">
							<nav id="curdOperation" >
								<button class="simpleButton" id="btnTableAddUser">新增</button>
								<button class="simpleButton">修改</button>
								<button class="simpleButton">删除</button>
							</nav>
							<nav id="pageOperation">
								第<span id="spanCurrentPage">${requestScope.page.currentPage}</span>页
								<button class="simpleButton">首页</button>
								<button class="simpleButton">上一页</button>
								<button class="simpleButton" id="btnNextPage">下一页</button>
								<button class="simpleButton">末页</button>
							</nav>
						</td>
					</tr>					
				</tfoot>
				<tbody id="userInfoTbody">
					<tr>
						<th><input type="checkbox" name="allCheck" id="allCheck"></th>
						<th>用户名</th>
						<th>密码</th>
						<th>性别</th>
						<th>爱好</th>
						<th>来自于</th>
						<th>电子邮箱</th>
					</tr>
					<c:forEach items="${requestScope.page.list}" var="user">
						<tr id="row_${user.id}">
							<td><input type="checkbox" name="checks" value="${user.id}"></td>
							<td>${user.name}</td>
							<td>${user.password}</td>
							<td>
							<c:if test="${user.sex==1}">男</c:if>
							<c:if test="${user.sex==0}">女</c:if>
							</td>
							<td>
								<c:if test="${empty user.hobbyCode}"><span style="color:red;">没有数据</span></c:if>
							${user.hobbyCode}</td>
							<td>
								<c:if test="${empty user.nativePlaceName}"><span style="color:red;">没有数据</span></c:if>
							${user.nativePlaceName}</td>
							<td>
								<c:if test="${empty user.email}"><span style="color:red;">没有数据</span></c:if>
							${user.email}</td>
						</tr>					
					</c:forEach>
				</tbody>
			</table>
		</article>
	</body>
</html>
